<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Document sans nom</title>
<style type="text/css">
#entete {
	background-image: url(images/shared/top_bg.jpg);
	background-repeat: repeat-x;
}
table {
	width: 100%;
	color: #393939;
}
#content {
	font-family: arial;
	background-color: #fff;
}
#footer {
	background-image: url(images/shared/top_bg.jpg);
	background-repeat: repeat-x;
}
#content {
	color: #F60;
}
#footer {
	color: #CCC;
}
</style></head>

<body>
<table width="588" height="556" border="1">
  <tr id="entete">
    <td height="87"><img src="images/shared/logo.png" width="156" height="66" alt="tilea" /></td>
  </tr>
  <tr id="content">
    <td height="316"><form id="form1" name="form1" method="post" action="index.php">
      <p>
        <label for="month">month</label>
        </p>
      <p>
        <input type="text" name="month" id="month" />
      </p>
      <p>
        <label for="day">day</label>
        </p>
      <p>
        <input type="text" name="day" id="day" />
      </p>
      <p>
        <label for="application">application</label>
      </p>
      <p>
        <input type="text" name="application" id="application" />
      </p>
      <p>
        <label for="user">user<br />
        </label>
        <input type="text" name="user" id="user" />
      </p>
      <p>
        <label for="status">status<br />
        </label>
        <input type="text" name="status" id="status" />
      </p>
      <p>
        <input type="submit" name="rechercher" id="rechercher" value="rechercher" />
      </p>
    </form></td>
  </tr>
  <tr id="footer">
    <td><p><?php
if(isset($_POST['month']))      $month=$_POST['month'];
else      $month="";
if(isset($_POST['day']))      $day=$_POST['day'];
else      $day="";
if(isset($_POST['user']))      $user=$_POST['user'];
else      $user="";
if(isset($_POST['application']))      $application=$_POST['application'];
else      $application="";

if(isset($_POST['status']))      $status=$_POST['status'];
else      $status="";

ob_start();
 $command="sudo locate -d /tmp/fiem.db /tmp/fiem/$month/$day/$application/$user/$status";

passthru($command,$resultat);
$var = ob_get_contents();
ob_end_clean(); 
if($resultat==0){
 echo '<div>',$var,'</div>' ;
}

?></p></td>
  </tr>
</table>

</body>
</html>
